connect to sql server and fetch records from it